﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<YourStore.Models.Product>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	SearchProduct
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="right">
    <h2>Search Result</h2>
    <div class="products">
     <ul>
       <% foreach (var product in Model)
           { %>
      <li>
       <a href="<%: Url.Action("Details", "Store", new { id = product.ProductId }) %>">
          <div class="product-pic"><img src='/Content/Uploads/<%: product.Image %>' width="180" height="142" alt="<%: product.Name %>" /></div></a>
          <div class="p-name"><%: product.Name%><span class="price">Price: $<%: String.Format("{0:F}", product.Price) %></span></div>
          <div class="details">
          <a href="<%= Url.Action("Details","Store", new { id = product.ProductId})%>">
          <img  src="/Content/Images/view-details.jpg"  width="105" alt="View Details" height="30"/></a>
          </div>


          <div class="add-cart">
          <a href="<%= Url.Action("AddToCart","ShoppingCart", new { id = product.ProductId})%>" class="btn_addcart">
              <img src="/Content/Images/add-cart.jpg" width="105" height="30" alt="Add to Cart" />
          </a>
          </div>
        </li> 
        <% } %>

      </ul>
      </div>
    </div>
</asp:Content>
